package csdn.xiancheng.li08;

public class Customer extends Thread{
    private Bum bum;
    
    public Customer(String name, Bum bum) {
        super(name);
        this.bum = bum;
    } 

    @Override
    public void run() {
        while (true) {
            bum.customer();
        //模拟吃包子时间
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        }
    }
}
